package b2.player
{
	import b2.config.*;
	
	public class SocialInfo
	{
		public var attackerId:int;
		public var attackerName:String;
		public var attackerTankIndex:int;
		public var attackerTankBasicLevel:int;
		public var attackerTankStrengthenLevel:int;
		
		public var targetId:int;
		public var honourChange:int;
		public var viewed:Boolean;
		public var attackDate:String;
		
		public function SocialInfo(socialXML:XML = null)
		{
			if (socialXML != null)
			{
				this.attackerId = socialXML.attackerId;
				this.attackerName = socialXML.attackerName;
				this.attackerTankIndex = socialXML.attackerTankIndex;
				this.attackerTankBasicLevel = socialXML.attackerTankBasicLevel;
				this.attackerTankStrengthenLevel = socialXML.attackerTankStrengthenLevel;
				this.targetId = socialXML.targetId;
				this.honourChange = socialXML.honourChange;
				this.viewed = Boolean(parseInt(socialXML.viewed));
				this.attackDate = socialXML.attackDate;
			}
		}
	}
}